package user_permissions

import (
	"time"
)

// 表名也是cache的tag
var TableName = "user_permissions"

// @title UserPermissions
// @description 用户权限列表
type UserPermissions struct {
	Id         int64     `xorm:"pk autoincr"`
	Name       string    `xorm:"varchar(64) notnull unique 'name'"`
	Sign       string    `xorm:"varchar(64) notnull unique 'sign'"`
	Pid        int64     `xorm:"integer notnull 'pid'"`
	Level      int       `xorm:"tinyint notnull 'level'"`
	HttpMethod string    `xorm:"varchar(128) notnull 'http_method'"`
	Route      string    `xorm:"varchar(64) notnull 'route'"`
	State      bool      `xorm:"BOOL null default(false) 'state'"`
	CreatedAt  time.Time `xorm:"notnull created 'created_at'"`
	UpdatedAt  time.Time `xorm:"null updated 'updated_at'"`
}
